3.35 \(\int \frac{A+B x+C x^2}{x^2 (a+b x^2+c x^4)^2} \, dx\)

Optimal. Leaf size=514 \[ -\frac{-10 a A c-a b C+3 A b^2}{2 a^2 x \left (b^2-4 a c\right )}-\frac{\sqrt{c} \left (A \left (3 b^2 \sqrt{b^2-4 a c}-10 a c \sqrt{b^2-4 a c}-16 a b c+3 b^3\right )-a C \left (b \sqrt{b^2-4 a c}-12 a c+b^2\right )\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{c} \left (-\frac{A \left (3 b^3-16 a b c\right )-a C \left (b^2-12 a c\right )}{\sqrt{b^2-4 a c}}-10 a A c-a b C+3 A b^2\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right ) \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{b B \left (b^2-6 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^{3/2}}-\frac{B \log \left (a+b x^2+c x^4\right )}{4 a^2}+\frac{B \log (x)}{a^2}+\frac{A \left (b^2-2 a c\right )+c x^2 (A b-2 a C)-a b C}{2 a x \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{B \left (-2 a c+b^2+b c x^2\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )} \]

[Out]

-(3*A*b^2 - 10*a*A*c - a*b*C)/(2*a^2*(b^2 - 4*a*c)*x) + (B*(b^2 - 2*a*c + b*c*x^2))/(2*a*(b^2 - 4*a*c)*(a + b*
x^2 + c*x^4)) + (A*(b^2 - 2*a*c) - a*b*C + c*(A*b - 2*a*C)*x^2)/(2*a*(b^2 - 4*a*c)*x*(a + b*x^2 + c*x^4)) - (S
qrt[c]*(A*(3*b^3 - 16*a*b*c + 3*b^2*Sqrt[b^2 - 4*a*c] - 10*a*c*Sqrt[b^2 - 4*a*c]) - a*(b^2 - 12*a*c + b*Sqrt[b
^2 - 4*a*c])*C)*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(2*Sqrt[2]*a^2*(b^2 - 4*a*c)^(3/2)*Sq
rt[b - Sqrt[b^2 - 4*a*c]]) - (Sqrt[c]*(3*A*b^2 - 10*a*A*c - a*b*C - (A*(3*b^3 - 16*a*b*c) - a*(b^2 - 12*a*c)*C
)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(2*Sqrt[2]*a^2*(b^2 - 4*a*c)*Sqr
t[b + Sqrt[b^2 - 4*a*c]]) + (b*B*(b^2 - 6*a*c)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a^2*(b^2 - 4*a*c)^
(3/2)) + (B*Log[x])/a^2 - (B*Log[a + b*x^2 + c*x^4])/(4*a^2)

________________________________________________________________________________________

Rubi [A]  time = 1.48571, antiderivative size = 514, normalized size of antiderivative = 1., number of steps used = 15, number of rules used = 13, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.464, Rules used = {1662, 1277, 1281, 1166, 205, 12, 1114, 740, 800, 634, 618, 206, 628} \[ -\frac{-10 a A c-a b C+3 A b^2}{2 a^2 x \left (b^2-4 a c\right )}-\frac{\sqrt{c} \left (A \left (3 b^2 \sqrt{b^2-4 a c}-10 a c \sqrt{b^2-4 a c}-16 a b c+3 b^3\right )-a C \left (b \sqrt{b^2-4 a c}-12 a c+b^2\right )\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{c} \left (-\frac{A \left (3 b^3-16 a b c\right )-a C \left (b^2-12 a c\right )}{\sqrt{b^2-4 a c}}-10 a A c-a b C+3 A b^2\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right ) \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{b B \left (b^2-6 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^{3/2}}-\frac{B \log \left (a+b x^2+c x^4\right )}{4 a^2}+\frac{B \log (x)}{a^2}+\frac{A \left (b^2-2 a c\right )+c x^2 (A b-2 a C)-a b C}{2 a x \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{B \left (-2 a c+b^2+b c x^2\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x + C*x^2)/(x^2*(a + b*x^2 + c*x^4)^2),x]

[Out]

-(3*A*b^2 - 10*a*A*c - a*b*C)/(2*a^2*(b^2 - 4*a*c)*x) + (B*(b^2 - 2*a*c + b*c*x^2))/(2*a*(b^2 - 4*a*c)*(a + b*
x^2 + c*x^4)) + (A*(b^2 - 2*a*c) - a*b*C + c*(A*b - 2*a*C)*x^2)/(2*a*(b^2 - 4*a*c)*x*(a + b*x^2 + c*x^4)) - (S
qrt[c]*(A*(3*b^3 - 16*a*b*c + 3*b^2*Sqrt[b^2 - 4*a*c] - 10*a*c*Sqrt[b^2 - 4*a*c]) - a*(b^2 - 12*a*c + b*Sqrt[b
^2 - 4*a*c])*C)*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(2*Sqrt[2]*a^2*(b^2 - 4*a*c)^(3/2)*Sq
rt[b - Sqrt[b^2 - 4*a*c]]) - (Sqrt[c]*(3*A*b^2 - 10*a*A*c - a*b*C - (A*(3*b^3 - 16*a*b*c) - a*(b^2 - 12*a*c)*C
)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(2*Sqrt[2]*a^2*(b^2 - 4*a*c)*Sqr
t[b + Sqrt[b^2 - 4*a*c]]) + (b*B*(b^2 - 6*a*c)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a^2*(b^2 - 4*a*c)^
(3/2)) + (B*Log[x])/a^2 - (B*Log[a + b*x^2 + c*x^4])/(4*a^2)

Rule 1662

Int[(Pq_)*((d_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x],
 k}, Int[(d*x)^m*Sum[Coeff[Pq, x, 2*k]*x^(2*k), {k, 0, q/2 + 1}]*(a + b*x^2 + c*x^4)^p, x] + Dist[1/d, Int[(d*
x)^(m + 1)*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0, (q - 1)/2 + 1}]*(a + b*x^2 + c*x^4)^p, x], x]] /; FreeQ[{
a, b, c, d, m, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rule 1277

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> -Simp[((f
*x)^(m + 1)*(a + b*x^2 + c*x^4)^(p + 1)*(d*(b^2 - 2*a*c) - a*b*e + (b*d - 2*a*e)*c*x^2))/(2*a*f*(p + 1)*(b^2 -
 4*a*c)), x] + Dist[1/(2*a*(p + 1)*(b^2 - 4*a*c)), Int[(f*x)^m*(a + b*x^2 + c*x^4)^(p + 1)*Simp[d*(b^2*(m + 2*
(p + 1) + 1) - 2*a*c*(m + 4*(p + 1) + 1)) - a*b*e*(m + 1) + c*(m + 2*(2*p + 3) + 1)*(b*d - 2*a*e)*x^2, x], x],
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && IntegerQ[2*p] && (IntegerQ[p] |
| IntegerQ[m])

Rule 1281

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[(d*(
f*x)^(m + 1)*(a + b*x^2 + c*x^4)^(p + 1))/(a*f*(m + 1)), x] + Dist[1/(a*f^2*(m + 1)), Int[(f*x)^(m + 2)*(a + b
*x^2 + c*x^4)^p*Simp[a*e*(m + 1) - b*d*(m + 2*p + 3) - c*d*(m + 4*p + 5)*x^2, x], x], x] /; FreeQ[{a, b, c, d,
 e, f, p}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[m, -1] && IntegerQ[2*p] && (IntegerQ[p] || IntegerQ[m])

Rule 1166

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1114

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)*(a +
 b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[(m - 1)/2]

Rule 740

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^(m + 1)*(
b*c*d - b^2*e + 2*a*c*e + c*(2*c*d - b*e)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c)*(c*d^2 - b*d*e
+ a*e^2)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)), Int[(d + e*x)^m*Simp[b*c*d*e*(2*p - m
+ 2) + b^2*e^2*(m + p + 2) - 2*c^2*d^2*(2*p + 3) - 2*a*c*e^2*(m + 2*p + 3) - c*e*(2*c*d - b*e)*(m + 2*p + 4)*x
, x]*(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b
*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && LtQ[p, -1] && IntQuadraticQ[a, b, c, d, e, m, p, x]

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{A+B x+C x^2}{x^2 \left (a+b x^2+c x^4\right )^2} \, dx &=\int \frac{B}{x \left (a+b x^2+c x^4\right )^2} \, dx+\int \frac{A+C x^2}{x^2 \left (a+b x^2+c x^4\right )^2} \, dx\\ &=\frac{A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2}{2 a \left (b^2-4 a c\right ) x \left (a+b x^2+c x^4\right )}+B \int \frac{1}{x \left (a+b x^2+c x^4\right )^2} \, dx-\frac{\int \frac{-3 A b^2+10 a A c+a b C-3 c (A b-2 a C) x^2}{x^2 \left (a+b x^2+c x^4\right )} \, dx}{2 a \left (b^2-4 a c\right )}\\ &=-\frac{3 A b^2-10 a A c-a b C}{2 a^2 \left (b^2-4 a c\right ) x}+\frac{A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2}{2 a \left (b^2-4 a c\right ) x \left (a+b x^2+c x^4\right )}+\frac{1}{2} B \operatorname{Subst}\left (\int \frac{1}{x \left (a+b x+c x^2\right )^2} \, dx,x,x^2\right )+\frac{\int \frac{-A \left (3 b^3-13 a b c\right )+a \left (b^2-6 a c\right ) C-c \left (3 A b^2-10 a A c-a b C\right ) x^2}{a+b x^2+c x^4} \, dx}{2 a^2 \left (b^2-4 a c\right )}\\ &=-\frac{3 A b^2-10 a A c-a b C}{2 a^2 \left (b^2-4 a c\right ) x}+\frac{B \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2}{2 a \left (b^2-4 a c\right ) x \left (a+b x^2+c x^4\right )}-\frac{B \operatorname{Subst}\left (\int \frac{-b^2+4 a c-b c x}{x \left (a+b x+c x^2\right )} \, dx,x,x^2\right )}{2 a \left (b^2-4 a c\right )}-\frac{\left (c \left (A \left (3 b^3-16 a b c+3 b^2 \sqrt{b^2-4 a c}-10 a c \sqrt{b^2-4 a c}\right )-a \left (b^2-12 a c+b \sqrt{b^2-4 a c}\right ) C\right )\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx}{4 a^2 \left (b^2-4 a c\right )^{3/2}}-\frac{\left (c \left (3 A b^2-10 a A c-a b C-\frac{A \left (3 b^3-16 a b c\right )-a \left (b^2-12 a c\right ) C}{\sqrt{b^2-4 a c}}\right )\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx}{4 a^2 \left (b^2-4 a c\right )}\\ &=-\frac{3 A b^2-10 a A c-a b C}{2 a^2 \left (b^2-4 a c\right ) x}+\frac{B \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2}{2 a \left (b^2-4 a c\right ) x \left (a+b x^2+c x^4\right )}-\frac{\sqrt{c} \left (A \left (3 b^3-16 a b c+3 b^2 \sqrt{b^2-4 a c}-10 a c \sqrt{b^2-4 a c}\right )-a \left (b^2-12 a c+b \sqrt{b^2-4 a c}\right ) C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{c} \left (3 A b^2-10 a A c-a b C-\frac{A \left (3 b^3-16 a b c\right )-a \left (b^2-12 a c\right ) C}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right ) \sqrt{b+\sqrt{b^2-4 a c}}}-\frac{B \operatorname{Subst}\left (\int \left (\frac{-b^2+4 a c}{a x}+\frac{b \left (b^2-5 a c\right )+c \left (b^2-4 a c\right ) x}{a \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )}{2 a \left (b^2-4 a c\right )}\\ &=-\frac{3 A b^2-10 a A c-a b C}{2 a^2 \left (b^2-4 a c\right ) x}+\frac{B \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2}{2 a \left (b^2-4 a c\right ) x \left (a+b x^2+c x^4\right )}-\frac{\sqrt{c} \left (A \left (3 b^3-16 a b c+3 b^2 \sqrt{b^2-4 a c}-10 a c \sqrt{b^2-4 a c}\right )-a \left (b^2-12 a c+b \sqrt{b^2-4 a c}\right ) C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{c} \left (3 A b^2-10 a A c-a b C-\frac{A \left (3 b^3-16 a b c\right )-a \left (b^2-12 a c\right ) C}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right ) \sqrt{b+\sqrt{b^2-4 a c}}}+\frac{B \log (x)}{a^2}-\frac{B \operatorname{Subst}\left (\int \frac{b \left (b^2-5 a c\right )+c \left (b^2-4 a c\right ) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 a^2 \left (b^2-4 a c\right )}\\ &=-\frac{3 A b^2-10 a A c-a b C}{2 a^2 \left (b^2-4 a c\right ) x}+\frac{B \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2}{2 a \left (b^2-4 a c\right ) x \left (a+b x^2+c x^4\right )}-\frac{\sqrt{c} \left (A \left (3 b^3-16 a b c+3 b^2 \sqrt{b^2-4 a c}-10 a c \sqrt{b^2-4 a c}\right )-a \left (b^2-12 a c+b \sqrt{b^2-4 a c}\right ) C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{c} \left (3 A b^2-10 a A c-a b C-\frac{A \left (3 b^3-16 a b c\right )-a \left (b^2-12 a c\right ) C}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right ) \sqrt{b+\sqrt{b^2-4 a c}}}+\frac{B \log (x)}{a^2}-\frac{B \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a^2}-\frac{\left (b B \left (b^2-6 a c\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a^2 \left (b^2-4 a c\right )}\\ &=-\frac{3 A b^2-10 a A c-a b C}{2 a^2 \left (b^2-4 a c\right ) x}+\frac{B \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2}{2 a \left (b^2-4 a c\right ) x \left (a+b x^2+c x^4\right )}-\frac{\sqrt{c} \left (A \left (3 b^3-16 a b c+3 b^2 \sqrt{b^2-4 a c}-10 a c \sqrt{b^2-4 a c}\right )-a \left (b^2-12 a c+b \sqrt{b^2-4 a c}\right ) C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{c} \left (3 A b^2-10 a A c-a b C-\frac{A \left (3 b^3-16 a b c\right )-a \left (b^2-12 a c\right ) C}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right ) \sqrt{b+\sqrt{b^2-4 a c}}}+\frac{B \log (x)}{a^2}-\frac{B \log \left (a+b x^2+c x^4\right )}{4 a^2}+\frac{\left (b B \left (b^2-6 a c\right )\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 a^2 \left (b^2-4 a c\right )}\\ &=-\frac{3 A b^2-10 a A c-a b C}{2 a^2 \left (b^2-4 a c\right ) x}+\frac{B \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2}{2 a \left (b^2-4 a c\right ) x \left (a+b x^2+c x^4\right )}-\frac{\sqrt{c} \left (A \left (3 b^3-16 a b c+3 b^2 \sqrt{b^2-4 a c}-10 a c \sqrt{b^2-4 a c}\right )-a \left (b^2-12 a c+b \sqrt{b^2-4 a c}\right ) C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{c} \left (3 A b^2-10 a A c-a b C-\frac{A \left (3 b^3-16 a b c\right )-a \left (b^2-12 a c\right ) C}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^2 \left (b^2-4 a c\right ) \sqrt{b+\sqrt{b^2-4 a c}}}+\frac{b B \left (b^2-6 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^{3/2}}+\frac{B \log (x)}{a^2}-\frac{B \log \left (a+b x^2+c x^4\right )}{4 a^2}\\ \end{align*}

Mathematica [A]  time = 2.27809, size = 559, normalized size = 1.09 \[ \frac{\frac{-4 a^2 c (B+C x)+2 a \left (b c x (3 A+x (B+C x))+2 A c^2 x^3+b^2 (B+C x)\right )-2 A b^2 x \left (b+c x^2\right )}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\sqrt{2} \sqrt{c} \left (A \left (-3 b^2 \sqrt{b^2-4 a c}+10 a c \sqrt{b^2-4 a c}+16 a b c-3 b^3\right )+a C \left (b \sqrt{b^2-4 a c}-12 a c+b^2\right )\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{2} \sqrt{c} \left (A \left (-3 b^2 \sqrt{b^2-4 a c}+10 a c \sqrt{b^2-4 a c}-16 a b c+3 b^3\right )+a C \left (b \sqrt{b^2-4 a c}+12 a c-b^2\right )\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{B \left (b^2 \sqrt{b^2-4 a c}-4 a c \sqrt{b^2-4 a c}-6 a b c+b^3\right ) \log \left (\sqrt{b^2-4 a c}-b-2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac{B \left (b^2 \sqrt{b^2-4 a c}-4 a c \sqrt{b^2-4 a c}+6 a b c-b^3\right ) \log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac{4 A}{x}+4 B \log (x)}{4 a^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x + C*x^2)/(x^2*(a + b*x^2 + c*x^4)^2),x]

[Out]

((-4*A)/x + (-4*a^2*c*(B + C*x) - 2*A*b^2*x*(b + c*x^2) + 2*a*(2*A*c^2*x^3 + b^2*(B + C*x) + b*c*x*(3*A + x*(B
 + C*x))))/((b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) + (Sqrt[2]*Sqrt[c]*(A*(-3*b^3 + 16*a*b*c - 3*b^2*Sqrt[b^2 - 4*a
*c] + 10*a*c*Sqrt[b^2 - 4*a*c]) + a*(b^2 - 12*a*c + b*Sqrt[b^2 - 4*a*c])*C)*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b
- Sqrt[b^2 - 4*a*c]]])/((b^2 - 4*a*c)^(3/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + (Sqrt[2]*Sqrt[c]*(A*(3*b^3 - 16*a*b
*c - 3*b^2*Sqrt[b^2 - 4*a*c] + 10*a*c*Sqrt[b^2 - 4*a*c]) + a*(-b^2 + 12*a*c + b*Sqrt[b^2 - 4*a*c])*C)*ArcTan[(
Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/((b^2 - 4*a*c)^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]) + 4*B*Log[x
] - (B*(b^3 - 6*a*b*c + b^2*Sqrt[b^2 - 4*a*c] - 4*a*c*Sqrt[b^2 - 4*a*c])*Log[-b + Sqrt[b^2 - 4*a*c] - 2*c*x^2]
)/(b^2 - 4*a*c)^(3/2) - (B*(-b^3 + 6*a*b*c + b^2*Sqrt[b^2 - 4*a*c] - 4*a*c*Sqrt[b^2 - 4*a*c])*Log[b + Sqrt[b^2
 - 4*a*c] + 2*c*x^2])/(b^2 - 4*a*c)^(3/2))/(4*a^2)

________________________________________________________________________________________

Maple [B]  time = 0.057, size = 2398, normalized size = 4.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((C*x^2+B*x+A)/x^2/(c*x^4+b*x^2+a)^2,x)

[Out]

-1/a*c/(4*a*c-b^2)/(16*a*c-4*b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)
^(1/2))*c)^(1/2))*C*(-4*a*c+b^2)^(1/2)*b^2+3/a^2*c/(4*a*c-b^2)/(16*a*c-4*b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*
c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*A*(-4*a*c+b^2)^(1/2)*b^3+3/a^2*c/(4*a*c-b^2)/(16
*a*c-4*b^2)*2^(1/2)/(((-4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*a*c-4*b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))
*C*(-4*a*c+b^2)^(1/2)-4*c^2/(4*a*c-b^2)/(16*a*c-4*b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(
1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*C*b

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)/x^2/(c*x^4+b*x^2+a)^2,x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)/x^2/(c*x^4+b*x^2+a)^2,x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x**2+B*x+A)/x**2/(c*x**4+b*x**2+a)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)/x^2/(c*x^4+b*x^2+a)^2,x, algorithm="giac")

[Out]

Exception raised: NotImplementedError